//
//  Computer.h
//  AutoPong
//
//  Created by Pierre DUCHENE on 10/12/09.
//  Copyright 2009 Pierre DUCHENE. All rights reserved.
//

#import <UIKit/UIKit.h>
@class Raquette;
@class AccelerometerDelegate;
@class Block;
@class AutoPongViewController;

@interface Computer : NSObject {
	NSThread* computeThread;
	AutoPongViewController* controller;
	Raquette* raquette;
	NSMutableSet* blocks;
	UIView* mainView;
	AccelerometerDelegate* accelerometerDelegate;
	float timeUntilCreateNewBlock;
	NSDate* lastBlockCreationDate;
	int currentScore;
	int bestScore;
}

@property (retain) AutoPongViewController* controller;
@property (assign) Raquette* raquette;
@property (assign) UIView* mainView;
@property (readonly) int currentScore;
@property (readonly) int bestScore;

- (id)initWithController:(AutoPongViewController*)controller;

- (void)runLoop;

- (void)moveRaquette;

- (void)generateBlocks;

- (void)moveBlocks;

@end
